﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>Unity Engine Analyzer Report</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>
    
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    
</head>
<body ng-app="unityReport">

<div class="container" ng-controller="ReportController as Report">
    <div class="page-header">
        <h1>Unity Engine Analyzer Report</h1>
        <p>{{Report.SourceFile}}<small> - {{Report.Date | date : 'medium'}}</small></p>
        
    </div>
    <table class="table table-striped">
        <thead>
        <tr>
            <th>Id</th>
            <th>Severity</th>
            <th>Message</th>
            <th>File</th>
            <th>Line Number</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="diagnostic in Report.Diagnostics">
            <td>{{diagnostic.Id}}</td>
            <td>{{diagnostic.Severity}}</td>
            <td>{{diagnostic.Message}}</td>
            <td>{{diagnostic.FileName}}</td>
            <td>{{diagnostic.LineNumber}}</td>
        </tr>
        </tbody>
    </table>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script type="text/javascript">
    angular.module('unityReport', [])
        .controller('ReportController', ['$http',function ($http) {
            var report = this;

            $http.get('report.json')
                .then(function success(response) {
                    report.SourceFile = response.data.File;
                    report.Diagnostics = response.data.Diagnostics;
                    report.Date = response.data.Date;
                }, function error(response) {
                    
                });

        }]);
</script>
</body>
</html>
